-
Notifications
You must be signed in to change notification settings - Fork 418
Detect commitment transaction confirmation in ChannelMonitor instead #4013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Detect commitment transaction confirmation in ChannelMonitor instead #4013
Conversation
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
This was already the case, at least if you connected the block to the monitor first, probably worth updating the commit message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is unhappy but otherwise happy to land this.
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
Previously, the `ChannelManager` would assume a `Channel` was closed the moment it saw a spend for its funding input. With splicing, this will no longer be the case. Since the `ChannelMonitor` is already responsible for reliably tracking each onchain transaction relevant to a channel, we now produce a `MonitorEvent::CommitmentTxConfirmed` event to inform the `ChannelManager` the channel can be considered closed and removed. As a result of this change, many tests failed now that we rely on handling the `MonitorEvent::CommitmentTxConfirmed` first before seeing the `ChannelMonitorUpdateStep::ChannelForceClosed` go out.
da958b0
to
68cd71c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4013 +/- ##
==========================================
- Coverage 88.85% 88.84% -0.02%
==========================================
Files 175 175
Lines 127710 127723 +13
Branches 127710 127723 +13
==========================================
- Hits 113478 113476 -2
- Misses 11675 11686 +11
- Partials 2557 2561 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Previously, the
ChannelManager
would assume aChannel
was closed the moment it saw a spend for its funding input. With splicing, this will no longer be the case. Since theChannelMonitor
is already responsible for reliably tracking each onchain transaction relevant to a channel, we now produce aMonitorEvent::CommitmentTxConfirmed
event to inform theChannelManager
the channel can be considered closed and removed.As a result of this change, many tests failed now that we rely on handling the
MonitorEvent::CommitmentTxConfirmed
first before seeing theChannelMonitorUpdateStep::ChannelForceClosed
go out.